<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        // 简单数据类型不能new  bigint()
        // 构造函数， 代码可读性
        const wes = Symbol('Wes');
        const person = Symbol('Wes');
        // console.log(wes === person);
        const classRoom ={
            [Symbol('Mark')]:{
                age:18,
                sex:'男'
            },
            [Symbol('oliva')]:{
                age:19,
                sex:'男'
            },
            [Symbol('oliva')]:{
                age:20,
                sex:'男'
            },
            "dl":{
                age:21,
                sex:'男'
            }
        }
        // for key in 循环对象的可枚举属性
        // symbol key 不可以被枚举
        // for(const key in classRoom){
        //     console.log(key);
        // }
        const syms =Object.getOwnPropertySymbols(classRoom);
        console.log(syms);
        const data = syms.map(sym => classRoom[sym]);
        console.log(data);
    </script>
</body>
</html>